<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <title>七日影视</title>
    <link href="${pageContext.request.contextPath}/layui/css/layui.css" rel="stylesheet"media="all"/>
    <link href="${pageContext.request.contextPath}/bootstrap-3.3.7-dist/css/bootstrap.css" rel="stylesheet" media="screen">
    <link href="${pageContext.request.contextPath}/css/index.css" rel="stylesheet"/>
    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
    <script src="${pageContext.request.contextPath}/layui/layui.js" charset="utf-8"></script>
    <script src="${pageContext.request.contextPath}/bootstrap-3.3.7-dist/js/bootstrap.js"></script>
</head>
<body>
<div class="box_1">
    <jsp:include page="common/header.jsp"></jsp:include>
    <jsp:include page="common/banner.jsp"></jsp:include>
    <div class="layui-container">
        <div class="content_item">
            <div class="layui-row">
                <c:choose>
                    <c:when test="${baseurl=='dfl'}">
                        <ul>
                            <c:forEach items="${listCover}" var="video">
                                <div class="layui-col-xs4 layui-col-sm4 layui-col-md2 layui-col-space10">
                                    <li class="li_2"><a href="http://jqaaa.com/jx.php?url=${video.url}" target="_blank"><span class="span_title">${video.title}</span><span class="span_title">${video.area}</span><span class="span_title">${video.toup}</span></a></li>
                                </div>
                            </c:forEach>
                        </ul>
                    </c:when>
                    <c:when test="${baseurl=='fl'}">
                        <ul>
                            <c:forEach items="${listCover}" var="video">
                                <div class="layui-col-xs4 layui-col-sm4 layui-col-md2 layui-col-space10">
                                    <li class="li_1">
                                        <div class="cover_item">
                                            <a class="play_a" href="http://jqaaa.com/jx.php?url=${video.url}">
                                                <div class="video_cover" style="background-image: url('${video.image}')">
                                                    <%--<img src="${video.image}">--%>
                                                    <span class="play_logo"></span>
                                                </div>
                                                <span class="play hidden-xs"></span>
                                                <div class="video_name">
                                                    <a href="http://jqaaa.com/jx.php?url=${video.url}">${video.title}</a>
                                                </div>
                                            </a>
                                        </div>
                                    </li>
                                </div>
                            </c:forEach>
                        </ul>
                    </c:when>
                    <c:when test="${baseurl=='3'}">
                        <ul>
                            <c:forEach items="${listCover}" var="video">
                                <div class="layui-col-xs4 layui-col-sm4 layui-col-md2 layui-col-space10">
                                    <li class="li_1">
                                        <div class="cover_item">
                                            <a class="play_a" href="${pageContext.request.contextPath}/zy2_img.do?image=${video.image}" style="background-image: url('${video.image}')">
                                                <div class="video_cover" style="background-image: url('${video.image}')">
                                                   <%-- <img src="${video.image}">--%>
                                                    <span class="play_logo"></span>
                                                </div>
                                                <span class="play hidden-xs"></span>
                                                <div class="video_name">
                                                    <a href="${pageContext.request.contextPath}/zy2_img.do?image=${video.image}"><span>${video.title}</span></a>
                                                </div>
                                            </a>
                                        </div>
                                    </li>
                                </div>
                            </c:forEach>
                        </ul>
                    </c:when>
                    <c:otherwise>
                        <ul>
                            <c:forEach items="${listCover}" var="video">
                                <div class="layui-col-xs4 layui-col-sm4 layui-col-md2 layui-col-space10">
                                    <li class="li_1">
                                        <div class="cover_item">
                                            <a class="play_a" href="${pageContext.request.contextPath}/videoJson2.do?image=${video.image}">
                                                <div class="video_cover" style="background-image: url('${video.image}')">
                                                   <%-- <img src="${video.image}">--%>
                                                    <span class="play_logo"></span>
                                                </div>
                                                <span class="play hidden-xs"></span>
                                                <div class="video_name">
                                                    <a href="${pageContext.request.contextPath}/videoJson2.do?image=${video.image}">${video.title}</a>
                                                </div>
                                            </a>
                                        </div>
                                    </li>
                                </div>
                            </c:forEach>
                        </ul>
                    </c:otherwise>
                </c:choose>
            </div>
            <div id="test1"></div>
        </div>
    </div>
    <div class="clear"></div>
    <div class="foot_1" style="text-align: center">
        <div style="margin: 6px 0;padding-top: 40px;">
            <p class="text-center"><span style="color:#000;text-align:center;font-size: 16px">本网站内容收集于互联网，七日影视不承担任何由于内容的合法性及健康性所引起的争议和法律责任<br>
Copyright ©&nbsp; 七日工作室 版权所有</span></p>
        </div>
    </div>
<input type="hidden" value=${pageContext.request.contextPath}${pageUrl} id="pageurl" />
    <input type="hidden" value=${totalRecord} id="totalRecord" />
    <input type="hidden" value=${curr} id="currpage" />
</div>
<script>
    var pageurl=document.getElementById("pageurl").value;
    function getTop() {
        var mytop = $(document).scrollTop();
        if (mytop > 360) {
            $(".zdy_nav").css({
                'display': 'none',
                'top': 0,
            });
        } else {
            $(".zdy_nav").css('display', 'block');
        }
        setTimeout(getTop);
    }
    getTop();
if(pageurl!="1"){
    layui.use('laypage', function(){
        var laypage = layui.laypage;
        //执行一个laypage实例
        laypage.render({
            elem: 'test1', //注意，这里的 test1 是 ID，不用加 # 号
            limit:12,
            groups: 3,
            curr: document.getElementById("currpage").value, //获取起始页
            count: document.getElementById("totalRecord").value,
            jump: function(obj, first) {
                //obj包含了当前分页的所有参数，比如：
                //console.log(obj.curr); //得到当前页，以便向服务端请求对应页的数据。
                // console.log(obj.limit); //得到每页显示的条数
                if(!first){
                    window.location.href =pageurl+obj.curr;
                }

            }//数据总数，从服务端得到

        });
    });
}


    layui.use('element', function(){
        var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块

        //监听导航点击
        element.on('nav(demo)', function(elem){
            //console.log(elem)
            layer.msg(elem.text());
        });
    });


    function ds_method()
    {
        $.ajax({
            url : "${pageContext.request.contextPath}/v_coverPage.do?category=ds",
            success : function(data) {
                var result = eval("(" + data + ")");
                alert(data)
            }
        });
    };
$(".li_1").hover(function () {
    $(this).find(".play_logo").css("display", "inline-block");
},function(){
    $(this).find(".play_logo").css("display", "none");
});
</script>

</body>
</html>